1. Field of the Invention
The present invention relates to a current switching circuit, and more particularly to a constant current switching circuit provided with a base current compensating circuit.
2. Description of the Related Art
A current switching circuit selects any one of n load elements Z1 through Zn by a switch 21 and supplies a constant current from a current source 22 to the selected load element Zx (x=1 through n), as shown in FIG. 1, for example.
FIG. 2 shows a detailed arrangement of the current switching circuit shown in FIG. 1. This circuit comprises a current setting section 2, a current switching section 3, a switch changeover section 4, and so on. The current setting section 2 comprises an operational amplifier 41, a resistor R1, an NPN bipolar transistor Tr4, and a reference power supply 45 for generating a reference voltage Vref. The operational amplifier 41 has a non-inverted input terminal (+) connected to a positive electrode of the reference power supply 45, an inverted terminal (-) connected to an emitter of the transistor Tr4, and an output terminal connected to a base of the transistor Tr4. A negative electrode of the reference power supply 45 is grounded. The resistor R1 is connected between the emitter of the transistor Tr4 and the ground. A collector current I0 of the transistor Tr4 is arranged to be set to a constant value.
The current switching section 3 is arranged to include PNP bipolar transistors Tr1 through Tr3, and n PNP bipolar switch transistors TrSW1 through TrSWn each serving as a switch. Emitters of the transistors Tr1 and Tr2 are connected to a power supply terminal 1, and bases thereof are connected with each other. A collector of the transistor Tr1 is connected to a collector of the transistor Tr4 provided in the current setting section 2. The transistor Tr3 has a base connected to the collectors of the transistors Tr1 and Tr4, an emitter connected to bases of the transistors Tr1 and Tr2, and a collector grounded. A collector of the transistor Tr2 is connected to each emitter of the switch transistors TrSW1 through TrSwn. Collectors of the transistors TrSW1 through TrSWn are connected to one terminals of the load elements Z1 through Zn, respectively and bases of which receive outputs from the switch changeover section 4, respectively. The other terminals of the load elements Z1 through Zn are grounded.
In the above arrangement, when a base current IB1 flows into the transistor Tr3 due to the current I0 set by the current setting section 2, the transistor Tr3 is turned on. As a result, the transistors Tr1 and Tr2 constituting a current mirror circuit are turned on, resulting in a collector current I1 flowing into the transistor Tr2. The base currents of the switch transistors TrSW1 through TrSWn are controlled by the switch changeover section 4 such that a base current IB2x flows into the transistor TrSWx (x=1 through n) connected to the load element Zx into which the current is intended to flow. As a result, the transistor TrSWx is turned on and a current Izx flows into the selected load element Zx.
The collector current I1 of the transistor Tr2 and the current Izx flowing into the selected load element Zx are expressed by the following equations: EQU I1=I0-IB1 (1) EQU Izx=I1-IB2x (2)
where, IB1 denotes a base current of the transistor Tr3, and IB2x denotes a base current of the transistor TrSWx.
If current amplification factors of the transistors Tr1 and Tr3 are assumed to be hFE1 and hFE3, respectively, the base current IB1 of the transistor Tr3 is expressed by equation (3). EQU IB1=2(I0-IB1)/(hFE1.times.hFE3) IB1=2I0/(hFE1.times.hFE3+2)(3)
Then, if the current amplification factor of the transistor TrSWx is assumed to be hFEx, the base current IB2x of the transistor TrSWx is expressed as IB2x=Izx/hFEx. Accordingly, IB1&lt;&lt;I0 is obtained from the equation (3). As a result, IB1 is approximately 0. Accordingly, I1=I0 is obtained from the equation (1). As a result, Izx=I0{1-(1/hFEx)} is obtained. Accordingly, the current Izx flowing into the load element Zx is changed in accordance with the current amplification factor hFEx of the switching transistor TrSWx.
As described above, according to a conventional current switch circuit, the current Izx flowing into the load element Zx is determined in accordance with Izx=I0.times.{1-(1/hFEx)}. For this reason, there is a drawback that when the current amplification factor hFEx of the switching transistor TrSWx is small, 1/hFEx cannot be ignored, resulting in Izx&lt;I0.
FIG. 3 shows a conventional current switching circuit which can compensate the influence by the base currents of the switching transistors TrSW1 through TrSWn upon the current flowing into the load element in the circuit shown in FIG. 2. In the circuit shown in FIG. 3, a base current compensating circuit 5 is provided in the current switching section 3'. The base current compensating circuit 5 comprises PNP bipolar transistors Tr5 through Tr7 and NPN bipolar transistors Tr8 and Tr9. The size of the transistor Tr5 is same as that of each switching transistor TrSW1 through TrSWn. An emitter of the transistor Tr5 is connected to the collector of the transistor Tr2, and a collector of which is connected to emitters of the transistors TrSW1 through TrSWn. Transistors Tr6 and Tr7 constitute a current mirror circuit. An emitter area of the transistor Tr6 is twice as that of the transistor Tr7. Emitters of the transistors Tr6 and Tr7 are connected to the power supply terminal 1, and the bases thereof are commonly connected. A collector of the transistor Tr6 is connected to a collector of the transistor Tr5. Transistors Tr8 and Tr9 constitute a current mirror circuit. The bases and the emitters of the transistors Tr8 and Tr9 are commonly connected, respectively. A collector of the transistor Tr8 is connected to the base of the transistor Tr5 as well as to the bases of the transistors Tr8 and Tr9. A collector of the transistor Tr9 is connected to the collector and the base of the transistor Tr7. There are provided m diodes D1, D2, . . . , Dm anodes and cathodes of which are serially connected between the emitters of the transistors Tr8 and Tr9 and the ground. These diodes D1, D2, . . . , Dm generate a reference voltage for setting the base bias voltage of the transistor Tr5.
The current switching circuit 3' shown in FIG. 3 has the following relations expressed by the equations (4) and (5) when the collector current of the transistor Tr2, the base current of the transistor Tr5, the base currents of the transistors Tr8 and Tr9, the base current of the transistor Tr6, the base current of the transistor Tr7, and the collector current of the transistor Tr6 are assumed to be I1, IB3, IB4, 2IB5, IB5, and I2, respectively. EQU Izx=I1-IB3+I2-IB2x (4) EQU I2=(IB3-2IB4-3IB5).times.2 (5)
From the equations (4) and (5), the following equation is obtained. EQU Izx=I1-IB2x+IB3-4IB4-6IB5
Since the size of each of the switching transistors TrSW1 through TrSWn is equal to the size of the transistor Tr5, IB2x=IB3 is obtained.
Further, IB4 is expressed as follows: EQU IB4=[(I1-IB3)/hFE5-2IB4]/hFE8
where hFE5 represents the current amplification factor of the transistor Tr5 and hFE8 represents the current amplification factor of the transistor Tr8. Thus, IB4 can be expressed as follows. EQU IB4=(I1-IB3)/[hFE5.times.(hFE8+2)]
The base current of the transistor Tr7 is expressed as follows. EQU IB5=[{(I1-IB3)/hFE5-2IB4}-3IB5]/(hFE7)
As a result, the following relations are established. EQU IB5=[{(I1-IB3)/hFE5}-2IB4]/(hFE7+3)
From IB4&lt;&lt;I1, IB4.apprch.0
From IB5&lt;&lt;I1, IB5.apprch.0
Accordingly, the following equation is obtained by substituting the equation (5) into the equation (4). EQU Izx=I1-IB3+2(IB3-2IB4-3IB5)-IB2x=I1-IB3+2IB3-IB3=I1
Accordingly, the circuit arrangement as shown in FIG. 3 permits the current Izx flowing into the selected load element Zx to be coincident with the collector current I1 of the transistor Tr2 and therefore is not influenced by the base currents of the switching transistors TrSW1 through TrSWn.
However, the circuit arrangement shown in FIG. 3 requires 5 bipolar transistors and m diodes to be added, resulting in increased number of elements. For this reason, when the current switching circuit is to be integrated, the pattern occupation area and the cost are increased.